package icasue.tools.sqlhelper.adaptor.ibatis.mapper;

import icasue.reflect.annotations.NotNull;
import icasue.tools.sqlhelper.core.SaveMode;
import icasue.tools.sqlhelper.adaptor.annotation.AutoProvider;

import java.util.List;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/11/12 上午9:39
 * @UpdateDate:
 * @Description:
 */
public interface Save<JavaType> {
    @AutoProvider(method = "save")
    void save(@NotNull JavaType inst, @NotNull SaveMode saveMode);

    @AutoProvider(method = "saveMulti")
    void saveMulti(@NotNull List<JavaType> instMulti, @NotNull SaveMode saveMode);

    @AutoProvider(method = "saveSmart")
    void saveSmart(@NotNull JavaType inst, @NotNull SaveMode saveMode);

    @AutoProvider(method = "saveSmartMulti")
    void saveSmartMulti(@NotNull List<JavaType> instMulti, @NotNull SaveMode saveMode);
}
